package com.shxy.entity.common.test;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 通用数据类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@MappedSuperclass
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class Item {
    @Id
    @Column(length = 32)
    protected String code;    // 编号
    @Column(nullable = false, unique = true)
    protected String name;    // 名称
}
